from django import template

from web import models

register = template.Library()


@register.filter
def color(num):
    return models.TransactionRecord.charge_type_class_mapping.get(num)
